package com.ruoyi.qualifica.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qualifica.mapper.QualificaMapper;
import com.ruoyi.qualifica.domain.Qualifica;
import com.ruoyi.qualifica.service.IQualificaService;

/**
 * 资质信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-06
 */
@Service
public class QualificaServiceImpl implements IQualificaService
{
    @Autowired
    private QualificaMapper qualificaMapper;

    /**
     * 查询资质信息
     *
     * @param id 资质信息主键
     * @return 资质信息
     */
    @Override
    public Qualifica selectQualificaById(Long id)
    {
        return qualificaMapper.selectQualificaById(id);
    }

    /**
     * 查询资质信息列表
     *
     * @param qualifica 资质信息
     * @return 资质信息
     */
    @Override
    public List<Qualifica> selectQualificaList(Qualifica qualifica)
    {
        return qualificaMapper.selectQualificaList(qualifica);
    }

    /**
     * 新增资质信息
     *
     * @param qualifica 资质信息
     * @return 结果
     */
    @Override
    public int insertQualifica(Qualifica qualifica)
    {
        qualifica.setCreateTime(DateUtils.getNowDate());
        return qualificaMapper.insertQualifica(qualifica);
    }

    /**
     * 修改资质信息
     *
     * @param qualifica 资质信息
     * @return 结果
     */
    @Override
    public int updateQualifica(Qualifica qualifica)
    {
        qualifica.setUpdateTime(DateUtils.getNowDate());
        return qualificaMapper.updateQualifica(qualifica);
    }

    /**
     * 批量删除资质信息
     *
     * @param ids 需要删除的资质信息主键
     * @return 结果
     */
    @Override
    public int deleteQualificaByIds(Long[] ids)
    {
        return qualificaMapper.deleteQualificaByIds(ids);
    }


    /**
     * 批量逻辑删除资质信息
     *
     * @param ids 需要删除的资质信息主键
     * @return 结果
     */
    @Override
    public int logicDeleteQualifica(Long[] ids,String delType,Long delUser)
    {
        return qualificaMapper.logicDeleteQualifica(ids,delType,delUser);
    }

    /**
     * 删除资质信息信息
     *
     * @param id 资质信息主键
     * @return 结果
     */
    @Override
    public int deleteQualificaById(Long id)
    {
        return qualificaMapper.deleteQualificaById(id);
    }
}
